import request from "@/utils/request";
export const apis = {
  sysDangerPoint: (data) => {
    return request({
      url: "/sysDangerPoint/getTimeData",
      method: "get",
      params: data,
    });
  },
  countAlarmByLevel: (data) => {
    return request({
      url: "/alarmPerimeterRecord/countAlarmByLevel",
      method: "get",
      params: data,
    });
  },

  lightningData: (data) => {
    return request({
      url: "/lightningData/list",
      method: "get",
      params: data,
    });
  },
  sysDangerCard: (data) => {
    return request({
      url: "/sysDangerPoint/getData",
      method: "get",
      params: data,
    });
  },

  sysGasPoint: (params) => {
    return request({
      url: "/sysGasPoint/getTimeData",
      method: "get",
      params,
    });
  },
  sysMonitor: (params) => {
    return request({
      url: "/sysMonitor/list",
      method: "get",
      params,
    });
  },
  sysMonitorConfirm: (data) => {
    return request({
      url: "/sysMonitor/confirm",
      method: "post",
      data: data,
    });
  },
  hzbj: (data) => {
    return request({
      url: "/sysFirePoint/getTimeData",
      method: "get",
      params: data,
    });
  },
  hjjc: (data) => {
    return request({
      url: "/sysEnvironmentPoint/getTimeData",
      method: "get",
      params: data,
    });
  },
  aqyb: (data) => {
    return request({
      url: "/safetyInstrument/getTimeData",
      method: "get",
      params: data,
    });
  },
  update: (data) => {
    return request({
      url: "/sysFirePoint/update",
      method: "post",
      data: data,
    });
  },
  getTjData: (params) => {
    return request({
      url: "/sysMonitor/countByLevel",
      method: "get",
      params,
    });
  },
  // new 2023-10-16
  getTjDataCountTop: () => {  
    return request({
      url: "/sysMonitor/countTop",
      method: "get"
    });
  },
  getXtCountByMonitorType: (params) => {
    return request({
      url: "/sysMonitor/countByMonitorType",
      method: "get",
      params,
    });
  },
  getCountByStateAndMonitorType: (params) => {
    return request({
      url: "/sysMonitor/countByStateAndMonitorType",
      method: "get",
      params,
    });
  },
  getCountByMonth: (params) => {
    return request({
      url: "/sysMonitor/countByMonth",
      method: "get",
      params,
    });
  },
  // new end
  getLdTjData: (params) => {
    return request({
      url: "/lightningData/queryYearOrMonthList",
      method: "get",
      params,
    });
  },
  getHistoryData: (params) => {
    return request({
      url: "/historyPointData/getHistoryData",
      method: "get",
      params,
    });
  },
};

export const countTop = (params) => {
  return request({
    url: "/sysMonitor/countTop",
    method: "get",
    params,
  });
};

export const countByType = (params) => {
  return request({
    url: "/sysMonitor/countByType",
    method: "get",
    params,
  });
};

export const countByMonth = (params) => {
  return request({
    url: "/sysMonitor/countByMonth",
    method: "get",
    params,
  });
};

export const countByState = (params) => {
  return request({
    url: "/sysMonitor/countByState",
    method: "get",
    params,
  });
};
